package com.recharge.core.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.recharge.core.entity.GoodsEntity;
import com.recharge.core.entity.GoodsGroupEntity;
import com.recharge.core.entity.GoodsProviderEntity;
import com.recharge.core.entity.ProviderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品与供应商关联 Mapper 接口
 * </p>
 *
 * @author reagan
 * @since 2020-08-19
 */
@Mapper
public interface GoodsProviderMapper extends BaseMapper<GoodsProviderEntity> {


    /**
     * 自实现分页查询
     * @param page
     * @param wrapper
     * @return
     */
    IPage<GoodsProviderEntity> selectPage(Page<GoodsProviderEntity> page, @Param("ew")  QueryWrapper<GoodsProviderEntity> wrapper);

    /**
     * 供货商品管理
     * @param page
     * @param wrapper
     * @return
     */
    IPage<GoodsProviderEntity> selectOtherPage(Page<GoodsProviderEntity> page, @Param("ew") QueryWrapper<GoodsProviderEntity> wrapper);


    List<Map<String, Object>> selectProviderByGoodsId(@Param("goodsId") String goodsId);
}
